﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@model PerfectBuyData.Usuario

@{
    ViewBag.Title = "Edit";
}

<article id="address">
    <h1>Editar Articulo</h1>
    @using (Html.BeginForm("Edit", "Usuarios", FormMethod.Post, new { @class = "usuarios" }))
    {
        @Html.ValidationSummary(true)

        <fieldset>
            @Html.HiddenFor(model => model.idUsuario)

            <div class="editor-label">
                <label>Nombre</label>
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.userName)
                @Html.ValidationMessageFor(model => model.userName)
            </div>

            <div class="editor-label">
                <label>Contraseña</label>
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.userPassword)
                @Html.ValidationMessageFor(model => model.userPassword)
            </div>

            <div class="editor-label">
                <label>Correo</label>
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.email)
                @Html.ValidationMessageFor(model => model.email)
            </div>

            <div class="editor-label">
                <label>Rol</label>
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.rol)
                @Html.ValidationMessageFor(model => model.rol)
            </div>

            <p>
                <input type="submit" value="Guardar" />
            </p>
        </fieldset>
    }
</article>
<div>
    @Html.ActionLink("Regresar a la lista", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
